package cn.com.huzo.webapp.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * 画面布局控制器
 * <p>
 * @author 吴旭
 */
@Controller
public class LayoutController {

    /**
     * 跳转到默认摸板
     * <p>
     * @return
     */
    @RequestMapping("/default_layout.html")
    public ModelAndView redirectDefaultLayout() {
        ModelAndView view = new ModelAndView();
        view.setViewName("layouts/layout_default");
        return view;
    }

    /**
     * 跳转到技术管理主画面
     * <p>
     * @return
     */
    @RequestMapping("tech/techMain.html")
    public ModelAndView redirectTechMainPage() {
        ModelAndView view = new ModelAndView();
        view.setViewName("02_tech/02_mainpage");
        return view;
    }

    /**
     * 跳转到采购管理主画面
     * <p>
     * @return
     */
    @RequestMapping("purchase/purchaseMain.html")
    public ModelAndView redirectPurchaseMainPage() {
        ModelAndView view = new ModelAndView();
        view.setViewName("03_purchase/03_mainpage");
        return view;
    }

    /**
     * 跳转到生产管理主画面
     * <p>
     * @return
     */
    @RequestMapping("manufacture/manufactureMain.html")
    public ModelAndView redirectManufactureMainPage() {
        ModelAndView view = new ModelAndView();
        view.setViewName("04_manufacture/04_mainpage");
        return view;
    }

    /**
     * 跳转到基础信息管理主画面
     * <p>
     * @return
     */
    @RequestMapping("master/mainpage.html")
    public ModelAndView redirectMasterMainPage() {
        ModelAndView view = new ModelAndView();
        view.setViewName("master.main.def");
        return view;
    }

    /**
     * 跳转到系统管理管理主画面
     * <p>
     * @return
     */
    @RequestMapping("admin/mainpage.html")
    public ModelAndView redirectAdminMainPage() {
        ModelAndView view = new ModelAndView();
        view.setViewName("admin.main.def");
        return view;
    }
}
